//
//  WBBaseVC.h
//  WeatherBar
//
//  Created by yby on 2024/6/7.
//

#import <UIKit/UIKit.h>
#import "WBNavBar.h"
#import "UIView+NetResultView.h"
NS_ASSUME_NONNULL_BEGIN

@interface WBBaseVC : UIViewController

/// 自定义导航栏
@property (nonatomic ,strong) WBNavBar *var_navBar;
/** 是否允许左滑 */
@property BOOL var_leftGestureEnable;
/** 隐藏系统导航栏 */
@property (nonatomic,assign) BOOL var_hiddenNavigationBar;
/**
 禁用边缘侧滑返回 默认NO
 */
@property (nonatomic,assign) BOOL var_prohibitReturn;

#pragma mark - 设置自定义导航
/** 隐藏系统的nav，显示自定义的Nav */
- (void)wb_showCustomerNavBarWithType:(WBNavBarType)type;
/** 改变自定义nav的透明度 */
- (void)wb_setCustomerNavAlpha:(CGFloat)alpha;
/** 设置搜索框占位文字 */
- (void)wb_setCustomerNavSearchBarPlaceHolder:(NSString *)placeHolder;
#pragma mark - 设置系统导航
/** 设置导航栏标题 */
- (void)wb_setNavTitle:(NSString *)title;
- (void)wb_updateNavTitle:(NSString *)title;
/** 设置导航右面的item */
- (void)wb_setNavRightButtonwithImg:(NSString *)normalImg selImg:(NSString *)selImg title:(NSString *)title action:(SEL)action;
/** 设置导航左面的item */
- (void)wb_setNavLeftButtonwithImg:(NSString *)normalImg selImg:(NSString *)selImg title:(NSString *)title action:(SEL)action;
/** 设置导航右面的按钮的可用状态 */
- (void)wb_setNavRightButtonEnable:(BOOL)enable;
/** 设置导航左边按钮的可用状态*/
- (void)wb_setNavLeftButtonEnable:(BOOL)enable;
/** 设置导航返回按钮 */
- (void)wb_setNavBackArrow;
/** 设置导航下一个按钮 */
- (void)wb_setNavNextArrow;
/** 设置搜索按钮 */
- (void)wb_setSearchButton;
/** 设置导航左边按钮为取消 */
- (void)wb_setNavCancelText;
/** 设置导航返回首级 */
- (void)wb_navBackToHomeButtonClicked:(UIButton *)sender;
/** 设置导航返回上一级 */
- (void)wb_navBackButtonClicked:(UIButton *)sender;
/** 设置导航栏透明 */
- (void)wb_setNavTransluent:(BOOL)transluent;
/** 取消设置导航栏透明 */
- (void)wb_restoreNavNoTransluent;
/** 添加蒙层 */
+ (UIView *)wb_addExceptionHandlingView:(UIView *)view frame:(CGRect)frame;
/** nav下面的黑线 */
- (UIImageView *)wb_findHairlineImageViewUnder:(UIView *)view;
/// 搜索的点击跳转需重写此方法
- (void)wb_searchButtonClick;
/// 自定义导航右边按钮点击
- (void)wb_customerNavRightButtonClick;


#pragma mark - 加载指示器
/// 开始加载显示
- (void)wb_beginLoading;

/// 隐藏加载显示
- (void)wb_endLoading;

#pragma mark - 空视图回调
/// 重试按钮回调
/// @param block 回调
- (void)wb_configRetryAction:(void (^)(void))block;
/// 返回按钮回调
/// @param block 回调
- (void)wb_configBackAction:(void (^)(void))block;



/// 做组件化解耦用的方法
+ (UIViewController *)wb_instanceSelfWithParam:(NSDictionary *)param;

@end

NS_ASSUME_NONNULL_END
